<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" href="../../../lib/extjs/ext_2_2_1/resources/css/ext-all.css">
	
    <script type="text/javascript" src="../../../lib/extjs/ext_2_2_1/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="../../../lib/extjs/ext_2_2_1/ext-all-debug.js"></script>
	
    <script type="text/javascript" src="Ext.ux.form.XMetaform.js"></script>
    <script type="text/javascript">
		Ext.onReady(function() {
		
		    Ext.BLANK_IMAGE_URL = '../../../lib/extjs/ext_2_2_1/resources/images/default/s.gif';
			Ext.QuickTips.init();
			
			var win = new Ext.Window({
		        id:'metaform-win',
		        layout:'fit',
				autoWidth: true,
				height: 350,
				title: 'Ext.ux.form.XMetaform',
		        items:{            
					width: 650,
					frame:true,
					xtype:'xmetaform',
					url: 'res/formconfig.php',
					autoInit: false/*,
		            items:[{
						xtype: 'fieldset',
						title: 'Personal Info',
			            layout:'column',
						height: 100,
			            items:[{
			                columnWidth:.5,
			                layout: 'form',
			                items: [{
			                    xtype:'textfield',
			                    fieldLabel: 'First Name',
			                    name: 'first',
			                    anchor:'95%',
								allowBlank: false
			                }, {
			                    xtype:'textfield',
			                    fieldLabel: 'Company',
			                    name: 'company',
			                    anchor:'95%',
								regex: '^[a-zA-Z_]+$'
			                }]
			            },{
			                columnWidth:.5,
			                layout: 'form',
			                items: [{
			                    xtype:'textfield',
			                    fieldLabel: 'Last Name',
			                    name: 'last',
			                    anchor:'95%'
			                },{
			                    xtype:'textfield',
			                    fieldLabel: 'Email',
			                    name: 'email',
			                    vtype:'email',
			                    anchor:'95%'
			                }]
			            }]
			        },{
			            xtype:'htmleditor',
			            id:'bio',
			            fieldLabel:'Biography',
			            height:150,
			            anchor:'98%'
			        }]*/,
		            buttons:[{
		                text:'Load',
		                handler:function() {
		                    Ext.getCmp('metaform-win').items.get(0).load();
		                }
		            },{
		                text:'Submit',
		                handler:function() {
		                    Ext.getCmp('metaform-win').items.get(0).submit();
		                }
		            }]
		        }
		    });
		
		    win.show();
		});
    </script>
    <title>Ext.ux.form.XMetaform Example</title>
</head>
<body>
</body>
</html>